<?php


namespace app\api\controller;

use app\admin\model\Food as FoodModel;

class Food extends Controller
{
    public function index($search='')
    {
        $model = new FoodModel();
        $users = $model->getList($search);
        return $this->renderSuccess($users, '获取美食数据成功');
    }
    public function detail($id)
    {
        $model = new FoodModel();
        $emp = $model->where(['food_id' => $id])->find();
        return $this->renderSuccess($emp, '获取美食数据成功');
    }
}
